package cn.luckdou.WeChat.model;

import java.util.Date;
import java.util.Map;


/**
 * @author Dadou 2017-12-5
 * 微信请求回传消息基本类
 */
public class BaseMessage {
    private String ToUserName;    // 接收方帐号（收到的OpenID）
    private String FromUserName;    // 开发者微信号
    private long CreateTime;    // 消息创建时间 （整型）
    private String MsgType;    // 消息类型（text/music/news）

    public String getToUserName() {
        return ToUserName;
    }

    public void setToUserName(String toUserName) {
        ToUserName = toUserName;
    }

    public String getFromUserName() {
        return FromUserName;
    }

    public void setFromUserName(String fromUserName) {
        FromUserName = fromUserName;
    }

    public long getCreateTime() {
        return CreateTime;
    }

    public void setCreateTime(long createTime) {
        CreateTime = createTime;
    }

    public String getMsgType() {
        return MsgType;
    }

    public void setMsgType(String msgType) {
        MsgType = msgType;
    }

    public void setMap(Map<String,String> map,String MsgType){
        this.ToUserName=map.get("FromUserName");
        this.FromUserName=map.get("ToUserName");
        this.CreateTime=new Date().getTime();
        this.MsgType=MsgType;
    }
}
